<?php
/*
  $Id: homepage_meta_info.php $
  Mefobe Cart Solutions
  http://www.mefobemarket.com

  Copyright (c) 2009 Wuxi Elootec Technology Co., Ltd

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License v2 (1991)
  as published by the Free Software Foundation.
*/
  require('includes/classes/homepage_meta_info.php');

  class toC_Json_Homepage_meta_info {

    function saveMetaInfo() {
      global $toC_Json, $osC_Language;
      
      $data = array('keywords' => $_REQUEST['HOME_META_KEYWORD'], 'descriptions' => $_REQUEST['HOME_META_DESCRIPTION']);
      
      if(toC_Homepage_Meta_Info_Admin::saveData($data)) {
        $response = array('success' => true, 'feedback' => $osC_Language->get('ms_success_action_performed'));
      } else {
        $response = array('success' => false, 'feedback' => $osC_Language->get('ms_error_action_not_performed'));
      }
      
      echo $toC_Json->encode($response);
    }

    function loadMetaInfo() {
      global $toC_Json;
      
      $data = toC_Homepage_Meta_Info_Admin::getData();
      
      $response = array('success' => true, 'data' => $data);
      
      echo $toC_Json->encode($response);
    }
  }
?>
